package com.exam.api.modules.order.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.exam.api.common.baseModule.domain.BaseDomain;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("tbl_order")
@Schema(description = "订单主表（支持选座+考试场景）")
public class TblOrder extends BaseDomain implements Serializable {

    /**
     * 商品ID（如课程包、考试资格商品）
     */
    @TableField("item_id")
    @Schema(description = "商品ID（如课程包、考试资格商品）")
    private Long itemId;

    private Long skuId;

    /**
     * 用户ID（购买者/考生）
     */
    @TableField("user_id")
    @Schema(description = "用户ID（购买者/考生）")
    private Long userId;

    /**
     * 支付完成时间，未支付则为空
     */
    @TableField("pay_time")
    @Schema(description = "支付完成时间，未支付则为空")
    private LocalDateTime payTime;
    private LocalDateTime successTime;
    private String orderId;
    /**
     */
    @TableField("order_status")
    private String orderStatus;
    private String itemTitle;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
